
#ifndef EXAMPLE_MASS_SPRING_COLLISION_H
#define EXAMPLE_MASS_SPRING_COLLISION_H

#include <QtGui/QMainWindow>
#include "ui_Example_Mass_Spring_Collision.h"

#include <sxQOpenGL_Viewport.h>
#include <sxOpenGL_Context.h>
#include <sxMassSpringSimulation.h>
#include <sxMassSpringMesh.h>
#include <sxMassSpringSimulationController.h>

using Sx::OpenGL::Graphics::Contexts::OpenGL_Context;
using Sx::QtInterface::QOpenGL_Viewport;
using Sx::Simulation::Simulations::MassSpringSimulation;
using Sx::Simulation::Interface::MassSpringSimulationController;
using Sx::Simulation::Objects::MassSpringMesh;

class Example_Mass_Spring_Collision : public QMainWindow {
	Q_OBJECT

public:
	Example_Mass_Spring_Collision(QWidget *parent = 0, Qt::WFlags flags = 0);
	~Example_Mass_Spring_Collision();

	void resizeEvent(QResizeEvent* e);

	void mousePressEvent(QMouseEvent* e);
	void mouseReleaseEvent(QMouseEvent* e);

private:
	Ui::Example_Mass_Spring_CollisionClass ui;

	std::shared_ptr<OpenGL_Context> openglContext;
	QOpenGL_Viewport* openglViewport;

	std::shared_ptr<MassSpringSimulation> massSpringSimulation;
	std::shared_ptr<MassSpringSimulationController> mssController;
	std::shared_ptr<MassSpringMesh> msm;
};

#endif
